package com.lm56.web;

import com.lm56.web.network.domain.Location;
import com.lm56.web.network.domain.ShippingType;
import com.lm56.web.network.domain.CompanyDTO;
import com.lm56.common.MyTextValuePair;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;

import java.util.List;

/**
 * Created by Kelvin Yeung on 2016/10/26.
 */
public interface CommonMapper {

    /**
     * ��ȡ��ַ�б�
     * @return
     */
    @Result
    List<MyTextValuePair<Integer>> getLocationsKeyValueList();
    @Result
    List<MyTextValuePair<Integer>> getLocationsKeyValueListByIds(@Param("ids")List<Long> ids);
    /**
     * ����Id��ȡlocation
     * @return
     */
    @Result
    Location getLocationById(long locationId);
    @Result
    List<ShippingType> getShippingTypeList();
    ShippingType loadShippingTypeById(@Param("typeId") Long typeId);

    /**
     * ���������ĵ�λ
     * @return
     */
    @Result
    public List<MyTextValuePair<String>>  getGoodsQtyUnit();


    /**
     * ���������ĵ�λ
     * @return
     */
    @Result
    public MyTextValuePair<String> getGoodsQtyUnitByUnitCode(String unitCode);


    @Result
    public List<CompanyDTO> getCompanyList();


}
